﻿@model HQPad.Models.Invocation

@{
    ViewBag.Title = "Create new invocation";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
    var ruleSetId = (int) ViewBag.RuleSetID;
}

@section PageScripts {
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
}

<h1>Create new invocation</h1>

<section class="content">

@using (Html.BeginForm()) {
    <fieldset class="block form form-wide-label">
        <legend>Basics</legend>

        @Html.ValidationSummary(true)
            @Html.Hidden("RuleSetID", ruleSetId)

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Name)
        </div>
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Description)
        </div>
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Rank)
        </div>
            @Html.DropDownList("Rank")
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Range)
        </div>
            @Html.EditorFor(model => model.Range)
            @Html.ValidationMessageFor(model => model.Range)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Duration)
        </div>
            @Html.EditorFor(model => model.Duration)
            @Html.ValidationMessageFor(model => model.Duration)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.IsExtendable)
        </div>
            @Html.EditorFor(model => model.IsExtendable)
            @Html.ValidationMessageFor(model => model.IsExtendable)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.IsCommon)
        </div>
            @Html.EditorFor(model => model.IsCommon)
            @Html.ValidationMessageFor(model => model.IsCommon)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Sphere)
        </div>
            @Html.DropDownList("Sphere")
            @Html.ValidationMessageFor(model => model.Sphere)
        </div>

        <p>
            <input type="submit" value="Create" class="button" />
        </p>
    </fieldset>
}

<div class="block">
    @Html.ActionLink("Back to List", "Index", null, new { @class="button" })
</div>

</section>